#ifndef TCPTOVREP_H
#define TCPTOVREP_H

#include <QObject>
#include <QTcpSocket>

#include <QTimer>
#include <QMutex>

#define D_COMM_SIZEOF_PKG_LEN 4
#define D_COMM_SIZEOF_CMD_TYPE 4
#define D_COMM_SIZEOF_BUF_SIZE 4

struct S_CLIENT_DATA{
    int pkgLen;
    int cmdType;
    int vecSize;
    QVector<float> vecData;
};
class TcpToVrep : public QTcpSocket
{
    Q_OBJECT
public:
    explicit TcpToVrep(QTcpSocket *parent = 0);

public  :
    void connectToVrep();
    void move_axies( QVector<float> val );
    QVector<float> get_axies_data();

public:
    QByteArray bufFromServer;//此缓冲区点数据将发向模拟器
    QByteArray bufToServer;//此缓冲区点数据将发送给客户端

    QString remoteIpAddress;
};

#endif // TCPTOVREP_H
